FROM node:lts-alpine AS BUILD
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build


FROM nginx:stable-alpine
COPY --from=BUILD /app/dist/jawar-portal-ui /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/conf.d/app.conf
